/*
 * @Author: 李环玉 834654733@qq.com
 * @Date: 2023-11-25 19:03:33
 * @LastEditors: 李环玉 834654733@qq.com
 * @LastEditTime: 2023-12-23 17:37:28
 * @FilePath: \koa-server\src\router\user.router.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
const Router = require('koa-router')
const { register,login,resetPassword,resetInfo } = require('../controller/user.controller')
const { userValidator,VerifyDuplicate,cryptPassWord,verifyLogin } = require('../middleware/user.middleware')
// const { auth } = require('../middleware/auth.middleware')
const router = new Router({prefix:'/users'})

router.post('/register',userValidator,VerifyDuplicate,cryptPassWord,register)
router.post('/login',userValidator,verifyLogin,login)
router.post('/reset',cryptPassWord,resetPassword)
router.post('/resetinfo',resetInfo)
module.exports = router